﻿//using EasyNetQ;
//using Microsoft.Extensions.Configuration;
//using Microsoft.Extensions.Logging;
//using MQ.Core.Admin.Extensions.Mq;
//using Quartz;
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Threading.Tasks;

//namespace MQ.Core.Admin.Schedule
//{
//    public class ScheduledJob:IJob
//    {
//        private readonly IConfiguration configuration;
//        private readonly ILogger<ScheduledJob> logger;
//        private readonly IBus bus;


//        public ScheduledJob(IConfiguration configuration, ILogger<ScheduledJob> logger, IBus bus)
//        {
//            this.logger = logger;
//            this.configuration = configuration;
//            this.bus = bus;
//        }

//        public async Task Execute(IJobExecutionContext context)
//        {

//            this.logger.LogWarning($"Hello from scheduled task {DateTime.Now.ToLongTimeString()}");
//            //bus.Receive("queue", x => {
//            //    x.Add<Message>(m => logger.LogWarning($"收到消息:{m.Title}:{m.Content}:{m.Time.ToString()}"));
//            //});
//            await Task.CompletedTask;

//        }
//    }
//}
